// MiniRT01.cpp : Defines the entry Point for the console application.
//

/*
source homepage of:
- the models: google 3D galery, archive3d.net
- the textures: spiralgraphics.biz
*/

#include "stdafx.h"

void ourscene(int width, int height, bool acceleration);

void assigment4_1_and_2();
void assigment4_ex3();

int main(int argc, char* argv[])
{
	//try
	{
		bool acceleration=true;
		int width=1280,
			height =960;
		//std::cout<<argc;
		if(argc ==3){
			width= atoi(argv[1]);
			height =atoi(argv[2]);
		}
		if(argc ==2){
			std::string arg(argv[1]);
			if(arg =="_NO_ACCELERATION=1")
				acceleration=false;
		}
		if(argc ==4){
			std::string arg(argv[1]);
			std::string arg2(argv[3]);
			if(arg =="_NO_ACCELERATION=1"){
				acceleration=false;
				width= atoi(argv[2]);
				height =atoi(argv[3]);
			}
			if(arg2 =="_NO_ACCELERATION=1"){
				acceleration=false;
				width= atoi(argv[1]);
				height =atoi(argv[2]);
			}
		}

		//width=400;
		//height=300;

		ourscene(width, height,acceleration);
		//assigment4_1_and_2();
		//assigment4_ex3();
	}
	/*catch (const std::exception &_ex)
	{
		std::cerr << "Error: " << _ex.what() << std::endl << "Terminating...";
	}
	catch (...)
	{
		std::cerr << "Unhandled exception. \n Terminating...";
	}*/
}


